<div class=" tableBoxJust ">
	<table class="table_normal ">
		<thead>
		<tr>
			<td>序号</td>
			<td>工单状态</td>
			<td>故障信息</td>
			<td>反馈信息</td>
			<td>执行人</td>
			<td>创建人</td>
			<td>实际完成时间</td>
			<td>要求完成时间</td>
			<td>创建时间</td>
			<td>操作</td>
		</tr>
		</thead>
		<tbody>
		<tr *ngFor="let v of workorderlist ;">
			<td>{{v.id}}</td>
			<td>{{staticObj[v.status]}}</td>
			<td>{{v.alarm.description}}</td>
            <td>
                <div class="list-group feedbackbox" *ngIf="v.feedback">

                    <button *ngFor="let vv of v.feedback ;let i=index" container="body" class="list-group-item " (click)="feedbackinfo(vv.id)">
                        <span class="badge">{{i+1}}</span>
                        <template  #j> <div [innerHtml]="vv.time|date:'yyyy-MM-dd HH:mm:ss'"></div></template>
                    </button>
                </div>
                </td>
			<td><span *ngIf="v.assigned">{{v.assigned.realName}}</span></td>
			<td><span *ngIf="v.created">{{v.created.realName}}</span></td>
            <td><span *ngIf="v.feedback && (v.status == 'processed' || v.status == 'closed')">{{v.feedback[0].time|date:'yyyy-MM-dd HH:mm:ss'}}</span></td>
			<td><span *ngIf="v.finishTime">{{v.finishTime|date:'yyyy-MM-dd HH:mm:ss'}}</span></td>
			<td><span *ngIf="v.creatTime">{{v.creatTime|date:'yyyy-MM-dd HH:mm:ss'}}</span></td>
			<td>
                <span class="table_btn_primary" *ngIf="v.status == 'pending' && (myrole == 'schoolmaster' || myrole=='supervisor')"  (click)="edit(v)">编辑工单</span>
                <span class="table_btn_primary" *ngIf="(v.status == 'pending' || v.status == 'rejected') && (myrole == 'patroller' || myrole=='patrollerLeader')" (click)="receiveworkorder(v)">接收工单</span>
                <span class="table_btn_primary" *ngIf="v.status == 'processing' && (myrole == 'patroller' || myrole=='patrollerLeader')" (click)="feedback(v.id)">反馈工单</span>
                <span class="table_btn_primary" *ngIf="v.status == 'processed' && (myrole == 'schoolmaster' || myrole=='supervisor')" (click)="checkupworkorder(v.feedback[0].id)">审核工单</span>
            </td>
		</tr>
		</tbody>
	</table>
</div>

<paginator [(paginator)]="paginator" (pageChange)="pageChanged($event)"></paginator>
